mod document_extractor;
mod html_extractor;

use std::sync::{Arc, Mutex};

use model_graph_types::{
    container::workflow::{
        DocumentExtractorStatement, HtmlExtractorStatement, HttpStatement,
        WorkflowBlockExecuteResult, WorkflowHttpMethod,
    },
    modeling::Value,
};

use crate::workflow::context::WorkflowContext;

pub async fn html_execute(
    statement: &HtmlExtractorStatement,
    context: Arc<Mutex<WorkflowContext>>,
) -> anyhow::Result<WorkflowBlockExecuteResult> {
    //获取请求的方法
    return html_extractor::execute(statement, context).await;
}

pub async fn document_execute(
    statement: &DocumentExtractorStatement,
    context: Arc<Mutex<WorkflowContext>>,
) -> anyhow::Result<WorkflowBlockExecuteResult> {
    //获取请求的方法
    return document_extractor::execute(statement, context).await;
}
